class Stack:
    
    def __init__(self):
        self._data = []
    
    def push(self,data):
        self._data.append(data)
    
    def pop(self):
        return self._data.pop()

    def printf(self):
        for i in reversed(self._data):
            print(i)
        print('-------------')


if __name__ == '__main__':
    s = Stack()
    s.push(5)
    s.push(2)
    s.push(3)
    s.printf()
    s.pop()
    s.printf()